Optimal. Leaf size=33 \[ \frac {3 a^2 x}{8}+\frac {1}{4} a^2 \sin (x) \cos ^3(x)+\frac {3}{8} a^2 \sin (x) \cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.03, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.273, Rules used = {3175, 2635, 8} \[ \frac {3 a^2 x}{8}+\frac {1}{4} a^2 \sin (x) \cos ^3(x)+\frac {3}{8} a^2 \sin (x) \cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3175
Rubi steps
\begin {align*} \int \left (a-a \sin ^2(x)\right )^2 \, dx &=a^2 \int \cos ^4(x) \, dx\\ &=\frac {1}{4} a^2 \cos ^3(x) \sin (x)+\frac {1}{4} \left (3 a^2\right ) \int \cos ^2(x) \, dx\\ &=\frac {3}{8} a^2 \cos (x) \sin (x)+\frac {1}{4} a^2 \cos ^3(x) \sin (x)+\frac {1}{8} \left (3 a^2\right ) \int 1 \, dx\\ &=\frac {3 a^2 x}{8}+\frac {3}{8} a^2 \cos (x) \sin (x)+\frac {1}{4} a^2 \cos ^3(x) \sin (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.00, size = 26, normalized size = 0.79 \[ a^2 \left (\frac {3 x}{8}+\frac {1}{4} \sin (2 x)+\frac {1}{32} \sin (4 x)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 28, normalized size = 0.85 \[ \frac {3}{8} \, a^{2} x + \frac {1}{8} \, {\left (2 \, a^{2} \cos \relax (x)^{3} + 3 \, a^{2} \cos \relax (x)\right )} \sin \relax (x) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 25, normalized size = 0.76 \[ \frac {3}{8} \, a^{2} x + \frac {1}{32} \, a^{2} \sin \left (4 \, x\right ) + \frac {1}{4} \, a^{2} \sin \left (2 \, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.34, size = 43, normalized size = 1.30 \[ a^{2} \left (-\frac {\left (\sin ^{3}\relax (x )+\frac {3 \sin \relax (x )}{2}\right ) \cos \relax (x )}{4}+\frac {3 x}{8}\right )-2 a^{2} \left (-\frac {\sin \relax (x ) \cos \relax (x )}{2}+\frac {x}{2}\right )+a^{2} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 40, normalized size = 1.21 \[ \frac {1}{32} \, a^{2} {\left (12 \, x + \sin \left (4 \, x\right ) - 8 \, \sin \left (2 \, x\right )\right )} - \frac {1}{2} \, a^{2} {\left (2 \, x - \sin \left (2 \, x\right )\right )} + a^{2} x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 13.76, size = 33, normalized size = 1.00 \[ \frac {\frac {3\,a^2\,{\mathrm {tan}\relax (x)}^3}{8}+\frac {5\,a^2\,\mathrm {tan}\relax (x)}{8}}{{\left ({\mathrm {tan}\relax (x)}^2+1\right )}^2}+\frac {3\,a^2\,x}{8} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.12, size = 110, normalized size = 3.33 \[ \frac {3 a^{2} x \sin ^{4}{\relax (x )}}{8} + \frac {3 a^{2} x \sin ^{2}{\relax (x )} \cos ^{2}{\relax (x )}}{4} - a^{2} x \sin ^{2}{\relax (x )} + \frac {3 a^{2} x \cos ^{4}{\relax (x )}}{8} - a^{2} x \cos ^{2}{\relax (x )} + a^{2} x - \frac {5 a^{2} \sin ^{3}{\relax (x )} \cos {\relax (x )}}{8} - \frac {3 a^{2} \sin {\relax (x )} \cos ^{3}{\relax (x )}}{8} + a^{2} \sin {\relax (x )} \cos {\relax (x )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________